09. Quiz: Using Sets
Directions:
Create a variable with the name myFavoriteFlavors
and give it the value of an empty Set
object. Then use the .add()
method to add the following strings to it:
- "chocolate chip"
- "cookies and cream"
- "strawberry"
- "vanilla"
Then use the .delete()
method to remove "strawberry" from the set.
Your Code:
Start Quiz:
/*
* Programming Quiz: Using Sets (3-1)
*
* Create a Set object and store it in a variable named `myFavoriteFlavors`. Add the following strings to the set:
* - chocolate chip
* - cookies and cream
* - strawberry
* - vanilla
*
* Then use the `.delete()` method to remove "strawberry" from the set.
*/